<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">


<ui:composition template="/template.xhtml">
	<ui:define name="tituloPagina">
		<p:outputLabel value="#{msgs['paginas.cadastro.titulo.projetos']}" />
	</ui:define>
	<ui:define name="principal">
		<div class="formulario">

			<p:panelGrid columns="3">
				<p:outputLabel value="*#{msgs['campos.titulo.nome']}" for="nome" />
				<p:inputText value="#{projetoBean.projeto.nome}"
					style="width: 219px;" id="nome" required="true" immediate="true"
					requiredMessage="#{msgs['mensagens.campo.obrigatorio']}" />
				<p:message for="nome" />


				<p:outputLabel value="*#{msgs['campos.titulo.descricao']}"
					for="descricao" />
				<p:inputTextarea value="#{projetoBean.projeto.descricao}" cols="22"
					style="width: 219px;" id="descricao" required="true"
					immediate="true"
					requiredMessage="#{msgs['mensagens.campo.obrigatorio']}" />
				<p:message for="descricao" />

				<p:outputLabel value="#{msgs['campos.titulo.responsavel']}"
					for="responsavel" />
				<p:selectOneMenu value="#{projetoBean.projeto.pessoa.id}"
					style="width: 227px;" id="responsavel" required="true"
					immediate="true"
					requiredMessage="#{msgs['mensagens.campo.obrigatorio']}">
					<f:selectItem itemLabel="#{msgs['campos.combobox.selecione']}"
						itemValue="" />

					<f:selectItems value="#{projetoBean.listaNomeResponsavel}" />
				</p:selectOneMenu>
				<p:message for="responsavel" />
			</p:panelGrid>
		</div>
	</ui:define>
	<ui:define name="botoes">
		<p:commandButton value="#{msgs['botoes.salvar']}"
			action="#{projetoBean.salvar}" icon="ui-icon-disk" ajax="false" />
		<p:commandButton value="#{msgs['botoes.cancelar']}"
			action="#{projetoBean.cancelar}" immediate="true" />
	</ui:define>
</ui:composition>
</html>